/*本文件用来存放程序全局变量*/

/*游戏控制全局变量*/
var myFlightCount = 0; //已布置飞机数量
var enemyFlightCount = 0;
var direction = 0; //飞机方向
var del = false; //删除还是添加
var fighting = false; //是否开始战斗
var aim = [0,0]; //瞄准
var enemyDestroy = 0; //摧毁敌军数量
var flightLost = 0; //失去飞机数量
var fightRound = 0; //回合
var count = 0; //全局计数器
var ai = aiComplete; //ai

/*定义己方飞机和敌方飞机*/
var myFlight = Array(3);
for (var i = 0; i < 3; i++) {
	myFlight[i] = Array(3);
}
var enemyFlight = Array(3);
for (var i = 0; i < 3; i++) {
	enemyFlight[i] = Array(3);
}

/*定义己方棋盘和敌方棋盘*/
var myBoard = Array(10);
for (var i = 0; i < 10; i++) {
	myBoard[i] = Array(10);
	for (var j = 0; j < 10; j++) {
		myBoard[i][j] = false;
	}
}
var enemyBoard = Array(10);
for (var i = 0; i < 10; i++) {
	enemyBoard[i] = Array(10);
	for (var j = 0; j < 10; j++) {
		enemyBoard[i][j] = false;
	}
}

/*定义瞄准地图*/
var shootMap = Array(10);
for (var i = 0; i < 10; i++) {
	shootMap[i] = Array(10);
	for (var j = 0; j < 10; j++) {
		shootMap[i][j] = false;
	}
}

/*标记地图*/
var markMap = Array(10);
for (var i = 0; i < 10; i++) {
	markMap[i] = Array(10);
	for (var j = 0; j < 10; j++) {
		markMap[i][j] = false;
	}
}